#include "resourceeffectvariables.h"

namespace gunsmith
{
CResourceEffectVariables::CResourceEffectVariables() : CResource(RT_EFFECTVARIABLES)
{
	
}

CResourceEffectVariables::~CResourceEffectVariables()
{
}

bool CResourceEffectVariables::Create(void *pSource)
{
	return true;
}

void CResourceEffectVariables::Destroy()
{
	m_mVariables.clear();
}

void CResourceEffectVariables::UpdateVariable(std::string sName, TEffectVariable* pVariable)
{
	m_mVariables[sName] = pVariable;
}

const TEffectVariable* CResourceEffectVariables::GetVar(std::string sName)
{
	VARMAP::iterator itFound = m_mVariables.find(sName);

	if(itFound != m_mVariables.end())
		return (*itFound).second;
	else
		return NULL;
}
};